package com.example.crm.mapper;

import com.example.crm.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

/**
 * @author lenovo
 */
@Repository
public interface UserMapper extends JpaRepository<User,Long> {
    /**
     * 根据查询信息
     * @param usrId
     * @return
     */
    @Query("select s from User s where s.usrId=?1")
    User findUserById(Long usrId);
}